//
//  CountryData.swift
//
//
//  Created by mslm on 16/11/2023.
//

import Foundation

// MARK: - CountryFlag

public struct CountryFlag: Codable {
    let emoji: String
    let unicode: String
    
    init(emoji: String, unicode: String) {
        self.emoji = emoji
        self.unicode = unicode
    }
}

// MARK: - CountryCurrency

public struct CountryCurrency: Codable {
    let code: String
    let symbol: String
    
    init(code: String, symbol: String) {
        self.code = code
        self.symbol = symbol
    }
}

// MARK: - CountryContinent

public struct CountryContinent: Codable {
    let code: String
    let name: String
    
    init(code: String, name: String) {
        self.code = code
        self.name = name
    }
}

// MARK: - CountryData

public class CountryData: Codable {
    
    // MARK: Public
    
    public func getCountryName(_ countryCode: String) -> String {
        CountryData.countryMap[countryCode] ?? ""
    }
    
    public func getCountryFlag(_ countryCode: String) -> CountryFlag {
        CountryData.countriesFlags[countryCode] ?? CountryFlag(emoji: "", unicode: "")
    }
    
    public func getCountryFlagURL(_ countryCode: String) -> String {
        countryFlagURL + countryCode + ".svg"
    }
    
    public func getCountryCurrency(_ countryCode: String) -> CountryCurrency {
        CountryData.countriesCurrencies[countryCode] ?? CountryCurrency(code: "", symbol: "")
    }
    
    public func getContinent(_ countryCode: String) -> CountryContinent {
        CountryData.continents[countryCode] ?? CountryContinent(code: "", name: "")
    }
    
    public func isEU(_ countryCode: String) -> Bool {
        CountryData.isEuCountries.contains(countryCode)
    }
    
    // MARK: Internal
    
    static let countryMap: [String: String] = [
        "BD": "Bangladesh",
        "BE": "Belgium",
        "BF": "Burkina Faso",
        "BG": "Bulgaria",
        "BA": "Bosnia and Herzegovina",
        "BB": "Barbados",
        "WF": "Wallis and Futuna",
        "BL": "Saint Barthelemy",
        "BM": "Bermuda",
        "BN": "Brunei",
        "BO": "Bolivia",
        "BH": "Bahrain",
        "BI": "Burundi",
        "BJ": "Benin",
        "BT": "Bhutan",
        "JM": "Jamaica",
        "BV": "Bouvet Island",
        "BW": "Botswana",
        "WS": "Samoa",
        "BQ": "Bonaire, Saint Eustatius and Saba",
        "BR": "Brazil",
        "BS": "Bahamas",
        "JE": "Jersey",
        "BY": "Belarus",
        "BZ": "Belize",
        "RU": "Russia",
        "RW": "Rwanda",
        "RS": "Serbia",
        "TL": "East Timor",
        "RE": "Reunion",
        "TM": "Turkmenistan",
        "TJ": "Tajikistan",
        "RO": "Romania",
        "TK": "Tokelau",
        "GW": "Guinea-Bissau",
        "GU": "Guam",
        "GT": "Guatemala",
        "GS": "South Georgia and the South Sandwich Islands",
        "GR": "Greece",
        "GQ": "Equatorial Guinea",
        "GP": "Guadeloupe",
        "JP": "Japan",
        "GY": "Guyana",
        "GG": "Guernsey",
        "GF": "French Guiana",
        "GE": "Georgia",
        "GD": "Grenada",
        "GB": "United Kingdom",
        "GA": "Gabon",
        "SV": "El Salvador",
        "GN": "Guinea",
        "GM": "Gambia",
        "GL": "Greenland",
        "GI": "Gibraltar",
        "GH": "Ghana",
        "OM": "Oman",
        "TN": "Tunisia",
        "JO": "Jordan",
        "HR": "Croatia",
        "HT": "Haiti",
        "HU": "Hungary",
        "HK": "Hong Kong",
        "HN": "Honduras",
        "HM": "Heard Island and McDonald Islands",
        "VE": "Venezuela",
        "PR": "Puerto Rico",
        "PS": "Palestinian Territory",
        "PW": "Palau",
        "PT": "Portugal",
        "SJ": "Svalbard and Jan Mayen",
        "PY": "Paraguay",
        "IQ": "Iraq",
        "PA": "Panama",
        "PF": "French Polynesia",
        "PG": "Papua New Guinea",
        "PE": "Peru",
        "PK": "Pakistan",
        "PH": "Philippines",
        "PN": "Pitcairn",
        "PL": "Poland",
        "PM": "Saint Pierre and Miquelon",
        "ZM": "Zambia",
        "EH": "Western Sahara",
        "EE": "Estonia",
        "EG": "Egypt",
        "ZA": "South Africa",
        "EC": "Ecuador",
        "IT": "Italy",
        "VN": "Vietnam",
        "SB": "Solomon Islands",
        "ET": "Ethiopia",
        "SO": "Somalia",
        "ZW": "Zimbabwe",
        "SA": "Saudi Arabia",
        "ES": "Spain",
        "ER": "Eritrea",
        "ME": "Montenegro",
        "MD": "Moldova",
        "MG": "Madagascar",
        "MF": "Saint Martin",
        "MA": "Morocco",
        "MC": "Monaco",
        "UZ": "Uzbekistan",
        "MM": "Myanmar",
        "ML": "Mali",
        "MO": "Macao",
        "MN": "Mongolia",
        "MH": "Marshall Islands",
        "MK": "Macedonia",
        "MU": "Mauritius",
        "MT": "Malta",
        "MW": "Malawi",
        "MV": "Maldives",
        "MQ": "Martinique",
        "MP": "Northern Mariana Islands",
        "MS": "Montserrat",
        "MR": "Mauritania",
        "IM": "Isle of Man",
        "UG": "Uganda",
        "TZ": "Tanzania",
        "MY": "Malaysia",
        "MX": "Mexico",
        "IL": "Israel",
        "FR": "France",
        "IO": "British Indian Ocean Territory",
        "SH": "Saint Helena",
        "FI": "Finland",
        "FJ": "Fiji",
        "FK": "Falkland Islands",
        "FM": "Micronesia",
        "FO": "Faroe Islands",
        "NI": "Nicaragua",
        "NL": "Netherlands",
        "NO": "Norway",
        "NA": "Namibia",
        "VU": "Vanuatu",
        "NC": "New Caledonia",
        "NE": "Niger",
        "NF": "Norfolk Island",
        "NG": "Nigeria",
        "NZ": "New Zealand",
        "NP": "Nepal",
        "NR": "Nauru",
        "NU": "Niue",
        "CK": "Cook Islands",
        "XK": "Kosovo",
        "CI": "Ivory Coast",
        "CH": "Switzerland",
        "CO": "Colombia",
        "CN": "China",
        "CM": "Cameroon",
        "CL": "Chile",
        "CC": "Cocos Islands",
        "CA": "Canada",
        "CG": "Republic of the Congo",
        "CF": "Central African Republic",
        "CD": "Democratic Republic of the Congo",
        "CZ": "Czech Republic",
        "CY": "Cyprus",
        "CX": "Christmas Island",
        "CR": "Costa Rica",
        "CW": "Curacao",
        "CV": "Cape Verde",
        "CU": "Cuba",
        "SZ": "Swaziland",
        "SY": "Syria",
        "SX": "Sint Maarten",
        "KG": "Kyrgyzstan",
        "KE": "Kenya",
        "SS": "South Sudan",
        "SR": "Suriname",
        "KI": "Kiribati",
        "KH": "Cambodia",
        "KN": "Saint Kitts and Nevis",
        "KM": "Comoros",
        "ST": "Sao Tome and Principe",
        "SK": "Slovakia",
        "KR": "South Korea",
        "SI": "Slovenia",
        "KP": "North Korea",
        "KW": "Kuwait",
        "SN": "Senegal",
        "SM": "San Marino",
        "SL": "Sierra Leone",
        "SC": "Seychelles",
        "KZ": "Kazakhstan",
        "KY": "Cayman Islands",
        "SG": "Singapore",
        "SE": "Sweden",
        "SD": "Sudan",
        "DO": "Dominican Republic",
        "DM": "Dominica",
        "DJ": "Djibouti",
        "DK": "Denmark",
        "VG": "British Virgin Islands",
        "DE": "Germany",
        "YE": "Yemen",
        "DZ": "Algeria",
        "US": "United States",
        "UY": "Uruguay",
        "YT": "Mayotte",
        "UM": "United States Minor Outlying Islands",
        "LB": "Lebanon",
        "LC": "Saint Lucia",
        "LA": "Laos",
        "TV": "Tuvalu",
        "TW": "Taiwan",
        "TT": "Trinidad and Tobago",
        "TR": "Turkey",
        "LK": "Sri Lanka",
        "LI": "Liechtenstein",
        "LV": "Latvia",
        "TO": "Tonga",
        "LT": "Lithuania",
        "LU": "Luxembourg",
        "LR": "Liberia",
        "LS": "Lesotho",
        "TH": "Thailand",
        "TF": "French Southern Territories",
        "TG": "Togo",
        "TD": "Chad",
        "TC": "Turks and Caicos Islands",
        "LY": "Libya",
        "VA": "Vatican",
        "VC": "Saint Vincent and the Grenadines",
        "AE": "United Arab Emirates",
        "AD": "Andorra",
        "AG": "Antigua and Barbuda",
        "AF": "Afghanistan",
        "AI": "Anguilla",
        "VI": "U.S. Virgin Islands",
        "IS": "Iceland",
        "IR": "Iran",
        "AM": "Armenia",
        "AL": "Albania",
        "AO": "Angola",
        "AQ": "Antarctica",
        "AS": "American Samoa",
        "AR": "Argentina",
        "AU": "Australia",
        "AT": "Austria",
        "AW": "Aruba",
        "IN": "India",
        "AX": "Aland Islands",
        "AZ": "Azerbaijan",
        "IE": "Ireland",
        "ID": "Indonesia",
        "UA": "Ukraine",
        "QA": "Qatar",
        "MZ": "Mozambique",
    ]
    
    static let isEuCountries = [
        "IE", "AT", "LT", "LU", "LV", "DE", "DK", "SE", "SI", "SK", "CZ", "CY",
        "NL", "FI", "FR", "MT", "ES", "IT", "EE", "PL", "PT", "HU", "HR", "GR",
        "RO", "BG", "BE",
    ]
    
    static let countriesFlags: [String: CountryFlag] = [
        "AD": CountryFlag(emoji: "🇦🇩", unicode: "U+1F1E6 U+1F1E9"),
        "AE": CountryFlag(emoji: "🇦🇪", unicode: "U+1F1E6 U+1F1EA"),
        "AF": CountryFlag(emoji: "🇦🇫", unicode: "U+1F1E6 U+1F1EB"),
        "AG": CountryFlag(emoji: "🇦🇬", unicode: "U+1F1E6 U+1F1EC"),
        "AI": CountryFlag(emoji: "🇦🇮", unicode: "U+1F1E6 U+1F1EE"),
        "AL": CountryFlag(emoji: "🇦🇱", unicode: "U+1F1E6 U+1F1F1"),
        "AM": CountryFlag(emoji: "🇦🇲", unicode: "U+1F1E6 U+1F1F2"),
        "AO": CountryFlag(emoji: "🇦🇴", unicode: "U+1F1E6 U+1F1F4"),
        "AQ": CountryFlag(emoji: "🇦🇶", unicode: "U+1F1E6 U+1F1F6"),
        "AR": CountryFlag(emoji: "🇦🇷", unicode: "U+1F1E6 U+1F1F7"),
        "AS": CountryFlag(emoji: "🇦🇸", unicode: "U+1F1E6 U+1F1F8"),
        "AT": CountryFlag(emoji: "🇦🇹", unicode: "U+1F1E6 U+1F1F9"),
        "AU": CountryFlag(emoji: "🇦🇺", unicode: "U+1F1E6 U+1F1FA"),
        "AW": CountryFlag(emoji: "🇦🇼", unicode: "U+1F1E6 U+1F1FC"),
        "AX": CountryFlag(emoji: "🇦🇽", unicode: "U+1F1E6 U+1F1FD"),
        "AZ": CountryFlag(emoji: "🇦🇿", unicode: "U+1F1E6 U+1F1FF"),
        "BA": CountryFlag(emoji: "🇧🇦", unicode: "U+1F1E7 U+1F1E6"),
        "BB": CountryFlag(emoji: "🇧🇧", unicode: "U+1F1E7 U+1F1E7"),
        "BD": CountryFlag(emoji: "🇧🇩", unicode: "U+1F1E7 U+1F1E9"),
        "BE": CountryFlag(emoji: "🇧🇪", unicode: "U+1F1E7 U+1F1EA"),
        "BF": CountryFlag(emoji: "🇧🇫", unicode: "U+1F1E7 U+1F1EB"),
        "BG": CountryFlag(emoji: "🇧🇬", unicode: "U+1F1E7 U+1F1EC"),
        "BH": CountryFlag(emoji: "🇧🇭", unicode: "U+1F1E7 U+1F1ED"),
        "BI": CountryFlag(emoji: "🇧🇮", unicode: "U+1F1E7 U+1F1EE"),
        "BJ": CountryFlag(emoji: "🇧🇯", unicode: "U+1F1E7 U+1F1EF"),
        "BL": CountryFlag(emoji: "🇧🇱", unicode: "U+1F1E7 U+1F1F1"),
        "BM": CountryFlag(emoji: "🇧🇲", unicode: "U+1F1E7 U+1F1F2"),
        "BN": CountryFlag(emoji: "🇧🇳", unicode: "U+1F1E7 U+1F1F3"),
        "BO": CountryFlag(emoji: "🇧🇴", unicode: "U+1F1E7 U+1F1F4"),
        "BQ": CountryFlag(emoji: "🇧🇶", unicode: "U+1F1E7 U+1F1F6"),
        "BR": CountryFlag(emoji: "🇧🇷", unicode: "U+1F1E7 U+1F1F7"),
        "BS": CountryFlag(emoji: "🇧🇸", unicode: "U+1F1E7 U+1F1F8"),
        "BT": CountryFlag(emoji: "🇧🇹", unicode: "U+1F1E7 U+1F1F9"),
        "BV": CountryFlag(emoji: "🇧🇻", unicode: "U+1F1E7 U+1F1FB"),
        "BW": CountryFlag(emoji: "🇧🇼", unicode: "U+1F1E7 U+1F1FC"),
        "BY": CountryFlag(emoji: "🇧🇾", unicode: "U+1F1E7 U+1F1FE"),
        "BZ": CountryFlag(emoji: "🇧🇿", unicode: "U+1F1E7 U+1F1FF"),
        "CA": CountryFlag(emoji: "🇨🇦", unicode: "U+1F1E8 U+1F1E6"),
        "CC": CountryFlag(emoji: "🇨🇨", unicode: "U+1F1E8 U+1F1E8"),
        "CD": CountryFlag(emoji: "🇨🇩", unicode: "U+1F1E8 U+1F1E9"),
        "CF": CountryFlag(emoji: "🇨🇫", unicode: "U+1F1E8 U+1F1EB"),
        "CG": CountryFlag(emoji: "🇨🇬", unicode: "U+1F1E8 U+1F1EC"),
        "CH": CountryFlag(emoji: "🇨🇭", unicode: "U+1F1E8 U+1F1ED"),
        "CI": CountryFlag(emoji: "🇨🇮", unicode: "U+1F1E8 U+1F1EE"),
        "CK": CountryFlag(emoji: "🇨🇰", unicode: "U+1F1E8 U+1F1F0"),
        "CL": CountryFlag(emoji: "🇨🇱", unicode: "U+1F1E8 U+1F1F1"),
        "CM": CountryFlag(emoji: "🇨🇲", unicode: "U+1F1E8 U+1F1F2"),
        "CN": CountryFlag(emoji: "🇨🇳", unicode: "U+1F1E8 U+1F1F3"),
        "CO": CountryFlag(emoji: "🇨🇴", unicode: "U+1F1E8 U+1F1F4"),
        "CR": CountryFlag(emoji: "🇨🇷", unicode: "U+1F1E8 U+1F1F7"),
        "CU": CountryFlag(emoji: "🇨🇺", unicode: "U+1F1E8 U+1F1FA"),
        "CV": CountryFlag(emoji: "🇨🇻", unicode: "U+1F1E8 U+1F1FB"),
        "CW": CountryFlag(emoji: "🇨🇼", unicode: "U+1F1E8 U+1F1FC"),
        "CX": CountryFlag(emoji: "🇨🇽", unicode: "U+1F1E8 U+1F1FD"),
        "CY": CountryFlag(emoji: "🇨🇾", unicode: "U+1F1E8 U+1F1FE"),
        "CZ": CountryFlag(emoji: "🇨🇿", unicode: "U+1F1E8 U+1F1FF"),
        "DE": CountryFlag(emoji: "🇩🇪", unicode: "U+1F1E9 U+1F1EA"),
        "DJ": CountryFlag(emoji: "🇩🇯", unicode: "U+1F1E9 U+1F1EF"),
        "DK": CountryFlag(emoji: "🇩🇰", unicode: "U+1F1E9 U+1F1F0"),
        "DM": CountryFlag(emoji: "🇩🇲", unicode: "U+1F1E9 U+1F1F2"),
        "DO": CountryFlag(emoji: "🇩🇴", unicode: "U+1F1E9 U+1F1F4"),
        "DZ": CountryFlag(emoji: "🇩🇿", unicode: "U+1F1E9 U+1F1FF"),
        "EC": CountryFlag(emoji: "🇪🇨", unicode: "U+1F1EA U+1F1E8"),
        "EE": CountryFlag(emoji: "🇪🇪", unicode: "U+1F1EA U+1F1EA"),
        "EG": CountryFlag(emoji: "🇪🇬", unicode: "U+1F1EA U+1F1EC"),
        "EH": CountryFlag(emoji: "🇪🇭", unicode: "U+1F1EA U+1F1ED"),
        "ER": CountryFlag(emoji: "🇪🇷", unicode: "U+1F1EA U+1F1F7"),
        "ES": CountryFlag(emoji: "🇪🇸", unicode: "U+1F1EA U+1F1F8"),
        "ET": CountryFlag(emoji: "🇪🇹", unicode: "U+1F1EA U+1F1F9"),
        "FI": CountryFlag(emoji: "🇫🇮", unicode: "U+1F1EB U+1F1EE"),
        "FJ": CountryFlag(emoji: "🇫🇯", unicode: "U+1F1EB U+1F1EF"),
        "FK": CountryFlag(emoji: "🇫🇰", unicode: "U+1F1EB U+1F1F0"),
        "FM": CountryFlag(emoji: "🇫🇲", unicode: "U+1F1EB U+1F1F2"),
        "FO": CountryFlag(emoji: "🇫🇴", unicode: "U+1F1EB U+1F1F4"),
        "FR": CountryFlag(emoji: "🇫🇷", unicode: "U+1F1EB U+1F1F7"),
        "GA": CountryFlag(emoji: "🇬🇦", unicode: "U+1F1EC U+1F1E6"),
        "GB": CountryFlag(emoji: "🇬🇧", unicode: "U+1F1EC U+1F1E7"),
        "GD": CountryFlag(emoji: "🇬🇩", unicode: "U+1F1EC U+1F1E9"),
        "GE": CountryFlag(emoji: "🇬🇪", unicode: "U+1F1EC U+1F1EA"),
        "GF": CountryFlag(emoji: "🇬🇫", unicode: "U+1F1EC U+1F1EB"),
        "GG": CountryFlag(emoji: "🇬🇬", unicode: "U+1F1EC U+1F1EC"),
        "GH": CountryFlag(emoji: "🇬🇭", unicode: "U+1F1EC U+1F1ED"),
        "GI": CountryFlag(emoji: "🇬🇮", unicode: "U+1F1EC U+1F1EE"),
        "GL": CountryFlag(emoji: "🇬🇱", unicode: "U+1F1EC U+1F1F1"),
        "GM": CountryFlag(emoji: "🇬🇲", unicode: "U+1F1EC U+1F1F2"),
        "GN": CountryFlag(emoji: "🇬🇳", unicode: "U+1F1EC U+1F1F3"),
        "GP": CountryFlag(emoji: "🇬🇵", unicode: "U+1F1EC U+1F1F5"),
        "GQ": CountryFlag(emoji: "🇬🇶", unicode: "U+1F1EC U+1F1F6"),
        "GR": CountryFlag(emoji: "🇬🇷", unicode: "U+1F1EC U+1F1F7"),
        "GS": CountryFlag(emoji: "🇬🇸", unicode: "U+1F1EC U+1F1F8"),
        "GT": CountryFlag(emoji: "🇬🇹", unicode: "U+1F1EC U+1F1F9"),
        "GU": CountryFlag(emoji: "🇬🇺", unicode: "U+1F1EC U+1F1FA"),
        "GW": CountryFlag(emoji: "🇬🇼", unicode: "U+1F1EC U+1F1FC"),
        "GY": CountryFlag(emoji: "🇬🇾", unicode: "U+1F1EC U+1F1FE"),
        "HK": CountryFlag(emoji: "🇭🇰", unicode: "U+1F1ED U+1F1F0"),
        "HM": CountryFlag(emoji: "🇭🇲", unicode: "U+1F1ED U+1F1F2"),
        "HN": CountryFlag(emoji: "🇭🇳", unicode: "U+1F1ED U+1F1F3"),
        "HR": CountryFlag(emoji: "🇭🇷", unicode: "U+1F1ED U+1F1F7"),
        "HT": CountryFlag(emoji: "🇭🇹", unicode: "U+1F1ED U+1F1F9"),
        "HU": CountryFlag(emoji: "🇭🇺", unicode: "U+1F1ED U+1F1FA"),
        "ID": CountryFlag(emoji: "🇮🇩", unicode: "U+1F1EE U+1F1E9"),
        "IE": CountryFlag(emoji: "🇮🇪", unicode: "U+1F1EE U+1F1EA"),
        "IL": CountryFlag(emoji: "🇮🇱", unicode: "U+1F1EE U+1F1F1"),
        "IM": CountryFlag(emoji: "🇮🇲", unicode: "U+1F1EE U+1F1F2"),
        "IN": CountryFlag(emoji: "🇮🇳", unicode: "U+1F1EE U+1F1F3"),
        "IO": CountryFlag(emoji: "🇮🇴", unicode: "U+1F1EE U+1F1F4"),
        "IQ": CountryFlag(emoji: "🇮🇶", unicode: "U+1F1EE U+1F1F6"),
        "IR": CountryFlag(emoji: "🇮🇷", unicode: "U+1F1EE U+1F1F7"),
        "IS": CountryFlag(emoji: "🇮🇸", unicode: "U+1F1EE U+1F1F8"),
        "IT": CountryFlag(emoji: "🇮🇹", unicode: "U+1F1EE U+1F1F9"),
        "JE": CountryFlag(emoji: "🇯🇪", unicode: "U+1F1EF U+1F1EA"),
        "JM": CountryFlag(emoji: "🇯🇲", unicode: "U+1F1EF U+1F1F2"),
        "JO": CountryFlag(emoji: "🇯🇴", unicode: "U+1F1EF U+1F1F4"),
        "JP": CountryFlag(emoji: "🇯🇵", unicode: "U+1F1EF U+1F1F5"),
        "KE": CountryFlag(emoji: "🇰🇪", unicode: "U+1F1F0 U+1F1EA"),
        "KG": CountryFlag(emoji: "🇰🇬", unicode: "U+1F1F0 U+1F1EC"),
        "KH": CountryFlag(emoji: "🇰🇭", unicode: "U+1F1F0 U+1F1ED"),
        "KI": CountryFlag(emoji: "🇰🇮", unicode: "U+1F1F0 U+1F1EE"),
        "KM": CountryFlag(emoji: "🇰🇲", unicode: "U+1F1F0 U+1F1F2"),
        "KN": CountryFlag(emoji: "🇰🇳", unicode: "U+1F1F0 U+1F1F3"),
        "KP": CountryFlag(emoji: "🇰🇵", unicode: "U+1F1F0 U+1F1F5"),
        "KR": CountryFlag(emoji: "🇰🇷", unicode: "U+1F1F0 U+1F1F7"),
        "KW": CountryFlag(emoji: "🇰🇼", unicode: "U+1F1F0 U+1F1FC"),
        "KY": CountryFlag(emoji: "🇰🇾", unicode: "U+1F1F0 U+1F1FE"),
        "KZ": CountryFlag(emoji: "🇰🇿", unicode: "U+1F1F0 U+1F1FF"),
        "LA": CountryFlag(emoji: "🇱🇦", unicode: "U+1F1F1 U+1F1E6"),
        "LB": CountryFlag(emoji: "🇱🇧", unicode: "U+1F1F1 U+1F1E7"),
        "LC": CountryFlag(emoji: "🇱🇨", unicode: "U+1F1F1 U+1F1E8"),
        "LI": CountryFlag(emoji: "🇱🇮", unicode: "U+1F1F1 U+1F1EE"),
        "LK": CountryFlag(emoji: "🇱🇰", unicode: "U+1F1F1 U+1F1F0"),
        "LR": CountryFlag(emoji: "🇱🇷", unicode: "U+1F1F1 U+1F1F7"),
        "LS": CountryFlag(emoji: "🇱🇸", unicode: "U+1F1F1 U+1F1F8"),
        "LT": CountryFlag(emoji: "🇱🇹", unicode: "U+1F1F1 U+1F1F9"),
        "LU": CountryFlag(emoji: "🇱🇺", unicode: "U+1F1F1 U+1F1FA"),
        "LV": CountryFlag(emoji: "🇱🇻", unicode: "U+1F1F1 U+1F1FB"),
        "LY": CountryFlag(emoji: "🇱🇾", unicode: "U+1F1F1 U+1F1FE"),
        "MA": CountryFlag(emoji: "🇲🇦", unicode: "U+1F1F2 U+1F1E6"),
        "MC": CountryFlag(emoji: "🇲🇨", unicode: "U+1F1F2 U+1F1E8"),
        "MD": CountryFlag(emoji: "🇲🇩", unicode: "U+1F1F2 U+1F1E9"),
        "ME": CountryFlag(emoji: "🇲🇪", unicode: "U+1F1F2 U+1F1EA"),
        "MF": CountryFlag(emoji: "🇲🇫", unicode: "U+1F1F2 U+1F1EB"),
        "MG": CountryFlag(emoji: "🇲🇬", unicode: "U+1F1F2 U+1F1EC"),
        "MH": CountryFlag(emoji: "🇲🇭", unicode: "U+1F1F2 U+1F1ED"),
        "MK": CountryFlag(emoji: "🇲🇰", unicode: "U+1F1F2 U+1F1F0"),
        "ML": CountryFlag(emoji: "🇲🇱", unicode: "U+1F1F2 U+1F1F1"),
        "MM": CountryFlag(emoji: "🇲🇲", unicode: "U+1F1F2 U+1F1F2"),
        "MN": CountryFlag(emoji: "🇲🇳", unicode: "U+1F1F2 U+1F1F3"),
        "MO": CountryFlag(emoji: "🇲🇴", unicode: "U+1F1F2 U+1F1F4"),
        "MP": CountryFlag(emoji: "🇲🇵", unicode: "U+1F1F2 U+1F1F5"),
        "MQ": CountryFlag(emoji: "🇲🇶", unicode: "U+1F1F2 U+1F1F6"),
        "MR": CountryFlag(emoji: "🇲🇷", unicode: "U+1F1F2 U+1F1F7"),
        "MS": CountryFlag(emoji: "🇲🇸", unicode: "U+1F1F2 U+1F1F8"),
        "MT": CountryFlag(emoji: "🇲🇹", unicode: "U+1F1F2 U+1F1F9"),
        "MU": CountryFlag(emoji: "🇲🇺", unicode: "U+1F1F2 U+1F1FA"),
        "MV": CountryFlag(emoji: "🇲🇻", unicode: "U+1F1F2 U+1F1FB"),
        "MW": CountryFlag(emoji: "🇲🇼", unicode: "U+1F1F2 U+1F1FC"),
        "MX": CountryFlag(emoji: "🇲🇽", unicode: "U+1F1F2 U+1F1FD"),
        "MY": CountryFlag(emoji: "🇲🇾", unicode: "U+1F1F2 U+1F1FE"),
        "MZ": CountryFlag(emoji: "🇲🇿", unicode: "U+1F1F2 U+1F1FF"),
        "NA": CountryFlag(emoji: "🇳🇦", unicode: "U+1F1F3 U+1F1E6"),
        "NC": CountryFlag(emoji: "🇳🇨", unicode: "U+1F1F3 U+1F1E8"),
        "NE": CountryFlag(emoji: "🇳🇪", unicode: "U+1F1F3 U+1F1EA"),
        "NF": CountryFlag(emoji: "🇳🇫", unicode: "U+1F1F3 U+1F1EB"),
        "NG": CountryFlag(emoji: "🇳🇬", unicode: "U+1F1F3 U+1F1EC"),
        "NI": CountryFlag(emoji: "🇳🇮", unicode: "U+1F1F3 U+1F1EE"),
        "NL": CountryFlag(emoji: "🇳🇱", unicode: "U+1F1F3 U+1F1F1"),
        "NO": CountryFlag(emoji: "🇳🇴", unicode: "U+1F1F3 U+1F1F4"),
        "NP": CountryFlag(emoji: "🇳🇵", unicode: "U+1F1F3 U+1F1F5"),
        "NR": CountryFlag(emoji: "🇳🇷", unicode: "U+1F1F3 U+1F1F7"),
        "NU": CountryFlag(emoji: "🇳🇺", unicode: "U+1F1F3 U+1F1FA"),
        "NZ": CountryFlag(emoji: "🇳🇿", unicode: "U+1F1F3 U+1F1FF"),
        "OM": CountryFlag(emoji: "🇴🇲", unicode: "U+1F1F4 U+1F1F2"),
        "PA": CountryFlag(emoji: "🇵🇦", unicode: "U+1F1F5 U+1F1E6"),
        "PE": CountryFlag(emoji: "🇵🇪", unicode: "U+1F1F5 U+1F1EA"),
        "PF": CountryFlag(emoji: "🇵🇫", unicode: "U+1F1F5 U+1F1EB"),
        "PG": CountryFlag(emoji: "🇵🇬", unicode: "U+1F1F5 U+1F1EC"),
        "PH": CountryFlag(emoji: "🇵🇭", unicode: "U+1F1F5 U+1F1ED"),
        "PK": CountryFlag(emoji: "🇵🇰", unicode: "U+1F1F5 U+1F1F0"),
        "PL": CountryFlag(emoji: "🇵🇱", unicode: "U+1F1F5 U+1F1F1"),
        "PM": CountryFlag(emoji: "🇵🇲", unicode: "U+1F1F5 U+1F1F2"),
        "PN": CountryFlag(emoji: "🇵🇳", unicode: "U+1F1F5 U+1F1F3"),
        "PR": CountryFlag(emoji: "🇵🇷", unicode: "U+1F1F5 U+1F1F7"),
        "PS": CountryFlag(emoji: "🇵🇸", unicode: "U+1F1F5 U+1F1F8"),
        "PT": CountryFlag(emoji: "🇵🇹", unicode: "U+1F1F5 U+1F1F9"),
        "PW": CountryFlag(emoji: "🇵🇼", unicode: "U+1F1F5 U+1F1FC"),
        "PY": CountryFlag(emoji: "🇵🇾", unicode: "U+1F1F5 U+1F1FE"),
        "QA": CountryFlag(emoji: "🇶🇦", unicode: "U+1F1F6 U+1F1E6"),
        "RE": CountryFlag(emoji: "🇷🇪", unicode: "U+1F1F7 U+1F1EA"),
        "RO": CountryFlag(emoji: "🇷🇴", unicode: "U+1F1F7 U+1F1F4"),
        "RS": CountryFlag(emoji: "🇷🇸", unicode: "U+1F1F7 U+1F1F8"),
        "RU": CountryFlag(emoji: "🇷🇺", unicode: "U+1F1F7 U+1F1FA"),
        "RW": CountryFlag(emoji: "🇷🇼", unicode: "U+1F1F7 U+1F1FC"),
        "SA": CountryFlag(emoji: "🇸🇦", unicode: "U+1F1F8 U+1F1E6"),
        "SB": CountryFlag(emoji: "🇸🇧", unicode: "U+1F1F8 U+1F1E7"),
        "SC": CountryFlag(emoji: "🇸🇨", unicode: "U+1F1F8 U+1F1E8"),
        "SD": CountryFlag(emoji: "🇸🇩", unicode: "U+1F1F8 U+1F1E9"),
        "SE": CountryFlag(emoji: "🇸🇪", unicode: "U+1F1F8 U+1F1EA"),
        "SG": CountryFlag(emoji: "🇸🇬", unicode: "U+1F1F8 U+1F1EC"),
        "SH": CountryFlag(emoji: "🇸🇭", unicode: "U+1F1F8 U+1F1ED"),
        "SI": CountryFlag(emoji: "🇸🇮", unicode: "U+1F1F8 U+1F1EE"),
        "SJ": CountryFlag(emoji: "🇸🇯", unicode: "U+1F1F8 U+1F1EF"),
        "SK": CountryFlag(emoji: "🇸🇰", unicode: "U+1F1F8 U+1F1F0"),
        "SL": CountryFlag(emoji: "🇸🇱", unicode: "U+1F1F8 U+1F1F1"),
        "SM": CountryFlag(emoji: "🇸🇲", unicode: "U+1F1F8 U+1F1F2"),
        "SN": CountryFlag(emoji: "🇸🇳", unicode: "U+1F1F8 U+1F1F3"),
        "SO": CountryFlag(emoji: "🇸🇴", unicode: "U+1F1F8 U+1F1F4"),
        "SR": CountryFlag(emoji: "🇸🇷", unicode: "U+1F1F8 U+1F1F7"),
        "SS": CountryFlag(emoji: "🇸🇸", unicode: "U+1F1F8 U+1F1F8"),
        "ST": CountryFlag(emoji: "🇸🇹", unicode: "U+1F1F8 U+1F1F9"),
        "SV": CountryFlag(emoji: "🇸🇻", unicode: "U+1F1F8 U+1F1FB"),
        "SX": CountryFlag(emoji: "🇸🇽", unicode: "U+1F1F8 U+1F1FD"),
        "SY": CountryFlag(emoji: "🇸🇾", unicode: "U+1F1F8 U+1F1FE"),
        "SZ": CountryFlag(emoji: "🇸🇿", unicode: "U+1F1F8 U+1F1FF"),
        "TC": CountryFlag(emoji: "🇹🇨", unicode: "U+1F1F9 U+1F1E8"),
        "TD": CountryFlag(emoji: "🇹🇩", unicode: "U+1F1F9 U+1F1E9"),
        "TF": CountryFlag(emoji: "🇹🇫", unicode: "U+1F1F9 U+1F1EB"),
        "TG": CountryFlag(emoji: "🇹🇬", unicode: "U+1F1F9 U+1F1EC"),
        "TH": CountryFlag(emoji: "🇹🇭", unicode: "U+1F1F9 U+1F1ED"),
        "TJ": CountryFlag(emoji: "🇹🇯", unicode: "U+1F1F9 U+1F1EF"),
        "TK": CountryFlag(emoji: "🇹🇰", unicode: "U+1F1F9 U+1F1F0"),
        "TL": CountryFlag(emoji: "🇹🇱", unicode: "U+1F1F9 U+1F1F1"),
        "TM": CountryFlag(emoji: "🇹🇲", unicode: "U+1F1F9 U+1F1F2"),
        "TN": CountryFlag(emoji: "🇹🇳", unicode: "U+1F1F9 U+1F1F3"),
        "TO": CountryFlag(emoji: "🇹🇴", unicode: "U+1F1F9 U+1F1F4"),
        "TR": CountryFlag(emoji: "🇹🇷", unicode: "U+1F1F9 U+1F1F7"),
        "TT": CountryFlag(emoji: "🇹🇹", unicode: "U+1F1F9 U+1F1F9"),
        "TV": CountryFlag(emoji: "🇹🇻", unicode: "U+1F1F9 U+1F1FB"),
        "TW": CountryFlag(emoji: "🇹🇼", unicode: "U+1F1F9 U+1F1FC"),
        "TZ": CountryFlag(emoji: "🇹🇿", unicode: "U+1F1F9 U+1F1FF"),
        "UA": CountryFlag(emoji: "🇺🇦", unicode: "U+1F1FA U+1F1E6"),
        "UG": CountryFlag(emoji: "🇺🇬", unicode: "U+1F1FA U+1F1EC"),
        "UM": CountryFlag(emoji: "🇺🇲", unicode: "U+1F1FA U+1F1F2"),
        "US": CountryFlag(emoji: "🇺🇸", unicode: "U+1F1FA U+1F1F8"),
        "UY": CountryFlag(emoji: "🇺🇾", unicode: "U+1F1FA U+1F1FE"),
        "UZ": CountryFlag(emoji: "🇺🇿", unicode: "U+1F1FA U+1F1FF"),
        "VA": CountryFlag(emoji: "🇻🇦", unicode: "U+1F1FB U+1F1E6"),
        "VC": CountryFlag(emoji: "🇻🇨", unicode: "U+1F1FB U+1F1E8"),
        "VE": CountryFlag(emoji: "🇻🇪", unicode: "U+1F1FB U+1F1EA"),
        "VG": CountryFlag(emoji: "🇻🇬", unicode: "U+1F1FB U+1F1EC"),
        "VI": CountryFlag(emoji: "🇻🇮", unicode: "U+1F1FB U+1F1EE"),
        "VN": CountryFlag(emoji: "🇻🇳", unicode: "U+1F1FB U+1F1F3"),
        "VU": CountryFlag(emoji: "🇻🇺", unicode: "U+1F1FB U+1F1FA"),
        "WF": CountryFlag(emoji: "🇼🇫", unicode: "U+1F1FC U+1F1EB"),
        "WS": CountryFlag(emoji: "🇼🇸", unicode: "U+1F1FC U+1F1F8"),
        "XK": CountryFlag(emoji: "🇽🇰", unicode: "U+1F1FD U+1F1F0"),
        "YE": CountryFlag(emoji: "🇾🇪", unicode: "U+1F1FE U+1F1EA"),
        "YT": CountryFlag(emoji: "🇾🇹", unicode: "U+1F1FE U+1F1F9"),
        "ZA": CountryFlag(emoji: "🇿🇦", unicode: "U+1F1FF U+1F1E6"),
        "ZM": CountryFlag(emoji: "🇿🇲", unicode: "U+1F1FF U+1F1F2"),
        "ZW": CountryFlag(emoji: "🇿🇼", unicode: "U+1F1FF U+1F1FC"),
    ]
    static let countriesCurrencies: [String: CountryCurrency] = [
        "AD": CountryCurrency(code: "EUR", symbol: "€"),
        "AE": CountryCurrency(code: "AED", symbol: "د.إ"),
        "AF": CountryCurrency(code: "AFN", symbol: "؋"),
        "AG": CountryCurrency(code: "XCD", symbol: "$"),
        "AI": CountryCurrency(code: "XCD", symbol: "$"),
        "AL": CountryCurrency(code: "ALL", symbol: "L"),
        "AM": CountryCurrency(code: "AMD", symbol: "֏"),
        "AO": CountryCurrency(code: "AOA", symbol: "Kz"),
        "AQ": CountryCurrency(code: "", symbol: "$"),
        "AR": CountryCurrency(code: "ARS", symbol: "$"),
        "AS": CountryCurrency(code: "USD", symbol: "$"),
        "AT": CountryCurrency(code: "EUR", symbol: "€"),
        "AU": CountryCurrency(code: "AUD", symbol: "$"),
        "AW": CountryCurrency(code: "AWG", symbol: "ƒ"),
        "AX": CountryCurrency(code: "EUR", symbol: "€"),
        "AZ": CountryCurrency(code: "AZN", symbol: "₼"),
        "BA": CountryCurrency(code: "BAM", symbol: "KM"),
        "BB": CountryCurrency(code: "BBD", symbol: "$"),
        "BD": CountryCurrency(code: "BDT", symbol: "৳"),
        "BE": CountryCurrency(code: "EUR", symbol: "€"),
        "BF": CountryCurrency(code: "XOF", symbol: "CFA"),
        "BG": CountryCurrency(code: "BGN", symbol: "лв"),
        "BH": CountryCurrency(code: "BHD", symbol: ".د.ب"),
        "BI": CountryCurrency(code: "BIF", symbol: "FBu"),
        "BJ": CountryCurrency(code: "XOF", symbol: "CFA"),
        "BL": CountryCurrency(code: "EUR", symbol: "€"),
        "BM": CountryCurrency(code: "BMD", symbol: "$"),
        "BN": CountryCurrency(code: "BND", symbol: "$"),
        "BO": CountryCurrency(code: "BOB", symbol: "$b"),
        "BQ": CountryCurrency(code: "USD", symbol: "$"),
        "BR": CountryCurrency(code: "BRL", symbol: "R$"),
        "BS": CountryCurrency(code: "BSD", symbol: "$"),
        "BT": CountryCurrency(code: "BTN", symbol: "Nu."),
        "BV": CountryCurrency(code: "NOK", symbol: "kr"),
        "BW": CountryCurrency(code: "BWP", symbol: "P"),
        "BY": CountryCurrency(code: "BYR", symbol: "Br"),
        "BZ": CountryCurrency(code: "BZD", symbol: "BZ$"),
        "CA": CountryCurrency(code: "CAD", symbol: "$"),
        "CC": CountryCurrency(code: "AUD", symbol: "$"),
        "CD": CountryCurrency(code: "CDF", symbol: "FC"),
        "CF": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "CG": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "CH": CountryCurrency(code: "CHF", symbol: "CHF"),
        "CI": CountryCurrency(code: "XOF", symbol: "CFA"),
        "CK": CountryCurrency(code: "NZD", symbol: "$"),
        "CL": CountryCurrency(code: "CLP", symbol: "$"),
        "CM": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "CN": CountryCurrency(code: "CNY", symbol: "¥"),
        "CO": CountryCurrency(code: "COP", symbol: "$"),
        "CR": CountryCurrency(code: "CRC", symbol: "₡"),
        "CU": CountryCurrency(code: "CUP", symbol: "₱"),
        "CV": CountryCurrency(code: "CVE", symbol: "$"),
        "CW": CountryCurrency(code: "ANG", symbol: "ƒ"),
        "CX": CountryCurrency(code: "AUD", symbol: "$"),
        "CY": CountryCurrency(code: "EUR", symbol: "€"),
        "CZ": CountryCurrency(code: "CZK", symbol: "Kč"),
        "DE": CountryCurrency(code: "EUR", symbol: "€"),
        "DJ": CountryCurrency(code: "DJF", symbol: "Fdj"),
        "DK": CountryCurrency(code: "DKK", symbol: "kr"),
        "DM": CountryCurrency(code: "XCD", symbol: "$"),
        "DO": CountryCurrency(code: "DOP", symbol: "RD$"),
        "DZ": CountryCurrency(code: "DZD", symbol: "دج"),
        "EC": CountryCurrency(code: "USD", symbol: "$"),
        "EE": CountryCurrency(code: "EUR", symbol: "€"),
        "EG": CountryCurrency(code: "EGP", symbol: "£"),
        "EH": CountryCurrency(code: "MAD", symbol: "MAD"),
        "ER": CountryCurrency(code: "ERN", symbol: "Nfk"),
        "ES": CountryCurrency(code: "EUR", symbol: "€"),
        "ET": CountryCurrency(code: "ETB", symbol: "Br"),
        "FI": CountryCurrency(code: "EUR", symbol: "€"),
        "FJ": CountryCurrency(code: "FJD", symbol: "$"),
        "FK": CountryCurrency(code: "FKP", symbol: "£"),
        "FM": CountryCurrency(code: "USD", symbol: "$"),
        "FO": CountryCurrency(code: "DKK", symbol: "kr"),
        "FR": CountryCurrency(code: "EUR", symbol: "€"),
        "GA": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "GB": CountryCurrency(code: "GBP", symbol: "£"),
        "GD": CountryCurrency(code: "XCD", symbol: "$"),
        "GE": CountryCurrency(code: "GEL", symbol: "ლ"),
        "GF": CountryCurrency(code: "EUR", symbol: "€"),
        "GG": CountryCurrency(code: "GBP", symbol: "£"),
        "GH": CountryCurrency(code: "GHS", symbol: "GH₵"),
        "GI": CountryCurrency(code: "GIP", symbol: "£"),
        "GL": CountryCurrency(code: "DKK", symbol: "kr"),
        "GM": CountryCurrency(code: "GMD", symbol: "D"),
        "GN": CountryCurrency(code: "GNF", symbol: "FG"),
        "GP": CountryCurrency(code: "EUR", symbol: "€"),
        "GQ": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "GR": CountryCurrency(code: "EUR", symbol: "€"),
        "GS": CountryCurrency(code: "GBP", symbol: "£"),
        "GT": CountryCurrency(code: "GTQ", symbol: "Q"),
        "GU": CountryCurrency(code: "USD", symbol: "$"),
        "GW": CountryCurrency(code: "XOF", symbol: "CFA"),
        "GY": CountryCurrency(code: "GYD", symbol: "$"),
        "HK": CountryCurrency(code: "HKD", symbol: "$"),
        "HM": CountryCurrency(code: "AUD", symbol: "$"),
        "HN": CountryCurrency(code: "HNL", symbol: "L"),
        "HR": CountryCurrency(code: "HRK", symbol: "kn"),
        "HT": CountryCurrency(code: "HTG", symbol: "G"),
        "HU": CountryCurrency(code: "HUF", symbol: "Ft"),
        "ID": CountryCurrency(code: "IDR", symbol: "Rp"),
        "IE": CountryCurrency(code: "EUR", symbol: "€"),
        "IL": CountryCurrency(code: "ILS", symbol: "₪"),
        "IM": CountryCurrency(code: "GBP", symbol: "£"),
        "IN": CountryCurrency(code: "INR", symbol: "₹"),
        "IO": CountryCurrency(code: "USD", symbol: "$"),
        "IQ": CountryCurrency(code: "IQD", symbol: "ع.د"),
        "IR": CountryCurrency(code: "IRR", symbol: "﷼"),
        "IS": CountryCurrency(code: "ISK", symbol: "kr"),
        "IT": CountryCurrency(code: "EUR", symbol: "€"),
        "JE": CountryCurrency(code: "GBP", symbol: "£"),
        "JM": CountryCurrency(code: "JMD", symbol: "J$"),
        "JO": CountryCurrency(code: "JOD", symbol: "JD"),
        "JP": CountryCurrency(code: "JPY", symbol: "¥"),
        "KE": CountryCurrency(code: "KES", symbol: "KSh"),
        "KG": CountryCurrency(code: "KGS", symbol: "лв"),
        "KH": CountryCurrency(code: "KHR", symbol: "៛"),
        "KI": CountryCurrency(code: "AUD", symbol: "$"),
        "KM": CountryCurrency(code: "KMF", symbol: "CF"),
        "KN": CountryCurrency(code: "XCD", symbol: "$"),
        "KP": CountryCurrency(code: "KPW", symbol: "₩"),
        "KR": CountryCurrency(code: "KRW", symbol: "₩"),
        "KW": CountryCurrency(code: "KWD", symbol: "KD"),
        "KY": CountryCurrency(code: "KYD", symbol: "$"),
        "KZ": CountryCurrency(code: "KZT", symbol: "₸"),
        "LA": CountryCurrency(code: "LAK", symbol: "₭"),
        "LB": CountryCurrency(code: "LBP", symbol: "£"),
        "LC": CountryCurrency(code: "XCD", symbol: "$"),
        "LI": CountryCurrency(code: "CHF", symbol: "CHF"),
        "LK": CountryCurrency(code: "LKR", symbol: "₨"),
        "LR": CountryCurrency(code: "LRD", symbol: "$"),
        "LS": CountryCurrency(code: "LSL", symbol: "M"),
        "LT": CountryCurrency(code: "LTL", symbol: "Lt"),
        "LU": CountryCurrency(code: "EUR", symbol: "€"),
        "LV": CountryCurrency(code: "EUR", symbol: "€"),
        "LY": CountryCurrency(code: "LYD", symbol: "LD"),
        "MA": CountryCurrency(code: "MAD", symbol: "MAD"),
        "MC": CountryCurrency(code: "EUR", symbol: "€"),
        "MD": CountryCurrency(code: "MDL", symbol: "lei"),
        "ME": CountryCurrency(code: "EUR", symbol: "€"),
        "MF": CountryCurrency(code: "EUR", symbol: "€"),
        "MG": CountryCurrency(code: "MGA", symbol: "Ar"),
        "MH": CountryCurrency(code: "USD", symbol: "$"),
        "MK": CountryCurrency(code: "MKD", symbol: "ден"),
        "ML": CountryCurrency(code: "XOF", symbol: "CFA"),
        "MM": CountryCurrency(code: "MMK", symbol: "K"),
        "MN": CountryCurrency(code: "MNT", symbol: "₮"),
        "MO": CountryCurrency(code: "MOP", symbol: "MOP$"),
        "MP": CountryCurrency(code: "USD", symbol: "$"),
        "MQ": CountryCurrency(code: "EUR", symbol: "€"),
        "MR": CountryCurrency(code: "MRO", symbol: "UM"),
        "MS": CountryCurrency(code: "XCD", symbol: "$"),
        "MT": CountryCurrency(code: "EUR", symbol: "€"),
        "MU": CountryCurrency(code: "MUR", symbol: "₨"),
        "MV": CountryCurrency(code: "MVR", symbol: "Rf"),
        "MW": CountryCurrency(code: "MWK", symbol: "MK"),
        "MX": CountryCurrency(code: "MXN", symbol: "$"),
        "MY": CountryCurrency(code: "MYR", symbol: "RM"),
        "MZ": CountryCurrency(code: "MZN", symbol: "MT"),
        "NA": CountryCurrency(code: "NAD", symbol: "N$"),
        "NC": CountryCurrency(code: "XPF", symbol: "₣"),
        "NE": CountryCurrency(code: "XOF", symbol: "CFA"),
        "NF": CountryCurrency(code: "AUD", symbol: "$"),
        "NG": CountryCurrency(code: "NGN", symbol: "₦"),
        "NI": CountryCurrency(code: "NIO", symbol: "C$"),
        "NL": CountryCurrency(code: "EUR", symbol: "€"),
        "NO": CountryCurrency(code: "NOK", symbol: "kr"),
        "NP": CountryCurrency(code: "NPR", symbol: "₨"),
        "NR": CountryCurrency(code: "AUD", symbol: "$"),
        "NU": CountryCurrency(code: "NZD", symbol: "$"),
        "NZ": CountryCurrency(code: "NZD", symbol: "$"),
        "OM": CountryCurrency(code: "OMR", symbol: "﷼"),
        "PA": CountryCurrency(code: "PAB", symbol: "B/."),
        "PE": CountryCurrency(code: "PEN", symbol: "S/"),
        "PF": CountryCurrency(code: "XPF", symbol: "₣"),
        "PG": CountryCurrency(code: "PGK", symbol: "K"),
        "PH": CountryCurrency(code: "PHP", symbol: "₱"),
        "PK": CountryCurrency(code: "PKR", symbol: "₨"),
        "PL": CountryCurrency(code: "PLN", symbol: "zł"),
        "PM": CountryCurrency(code: "EUR", symbol: "€"),
        "PN": CountryCurrency(code: "NZD", symbol: "$"),
        "PR": CountryCurrency(code: "USD", symbol: "$"),
        "PS": CountryCurrency(code: "ILS", symbol: "₪"),
        "PT": CountryCurrency(code: "EUR", symbol: "€"),
        "PW": CountryCurrency(code: "USD", symbol: "$"),
        "PY": CountryCurrency(code: "PYG", symbol: "₲"),
        "QA": CountryCurrency(code: "QAR", symbol: "﷼"),
        "RE": CountryCurrency(code: "EUR", symbol: "€"),
        "RO": CountryCurrency(code: "RON", symbol: "lei"),
        "RS": CountryCurrency(code: "RSD", symbol: "Дин."),
        "RU": CountryCurrency(code: "RUB", symbol: "₽"),
        "RW": CountryCurrency(code: "RWF", symbol: "FRw"),
        "SA": CountryCurrency(code: "SAR", symbol: "﷼"),
        "SB": CountryCurrency(code: "SBD", symbol: "$"),
        "SC": CountryCurrency(code: "SCR", symbol: "₨"),
        "SD": CountryCurrency(code: "SDG", symbol: "ج.س."),
        "SE": CountryCurrency(code: "SEK", symbol: "kr"),
        "SG": CountryCurrency(code: "SGD", symbol: "$"),
        "SH": CountryCurrency(code: "SHP", symbol: "£"),
        "SI": CountryCurrency(code: "EUR", symbol: "€"),
        "SJ": CountryCurrency(code: "NOK", symbol: "kr"),
        "SK": CountryCurrency(code: "EUR", symbol: "€"),
        "SL": CountryCurrency(code: "SLL", symbol: "Le"),
        "SM": CountryCurrency(code: "EUR", symbol: "€"),
        "SN": CountryCurrency(code: "XOF", symbol: "CFA"),
        "SO": CountryCurrency(code: "SOS", symbol: "S"),
        "SR": CountryCurrency(code: "SRD", symbol: "$"),
        "SS": CountryCurrency(code: "SSP", symbol: "£"),
        "ST": CountryCurrency(code: "STD", symbol: "Db"),
        "SV": CountryCurrency(code: "USD", symbol: "$"),
        "SX": CountryCurrency(code: "ANG", symbol: "ƒ"),
        "SY": CountryCurrency(code: "SYP", symbol: "£"),
        "SZ": CountryCurrency(code: "SZL", symbol: "L"),
        "TC": CountryCurrency(code: "USD", symbol: "$"),
        "TD": CountryCurrency(code: "XAF", symbol: "FCFA"),
        "TF": CountryCurrency(code: "EUR", symbol: "€"),
        "TG": CountryCurrency(code: "XOF", symbol: "CFA"),
        "TH": CountryCurrency(code: "THB", symbol: "฿"),
        "TJ": CountryCurrency(code: "TJS", symbol: "SM"),
        "TK": CountryCurrency(code: "NZD", symbol: "$"),
        "TL": CountryCurrency(code: "USD", symbol: "$"),
        "TM": CountryCurrency(code: "TMT", symbol: "T"),
        "TN": CountryCurrency(code: "TND", symbol: "د.ت"),
        "TO": CountryCurrency(code: "TOP", symbol: "T$"),
        "TR": CountryCurrency(code: "TRY", symbol: "₺"),
        "TT": CountryCurrency(code: "TTD", symbol: "TT$"),
        "TV": CountryCurrency(code: "AUD", symbol: "$"),
        "TW": CountryCurrency(code: "TWD", symbol: "NT$"),
        "TZ": CountryCurrency(code: "TZS", symbol: "TSh"),
        "UA": CountryCurrency(code: "UAH", symbol: "₴"),
        "UG": CountryCurrency(code: "UGX", symbol: "USh"),
        "UM": CountryCurrency(code: "USD", symbol: "$"),
        "US": CountryCurrency(code: "USD", symbol: "$"),
        "UY": CountryCurrency(code: "UYU", symbol: "$U"),
        "UZ": CountryCurrency(code: "UZS", symbol: "лв"),
        "VA": CountryCurrency(code: "EUR", symbol: "€"),
        "VC": CountryCurrency(code: "XCD", symbol: "$"),
        "VE": CountryCurrency(code: "VEF", symbol: "Bs"),
        "VG": CountryCurrency(code: "USD", symbol: "$"),
        "VI": CountryCurrency(code: "USD", symbol: "$"),
        "VN": CountryCurrency(code: "VND", symbol: "₫"),
        "VU": CountryCurrency(code: "VUV", symbol: "VT"),
        "WF": CountryCurrency(code: "XPF", symbol: "₣"),
        "WS": CountryCurrency(code: "WST", symbol: "WS$"),
        "XK": CountryCurrency(code: "EUR", symbol: "€"),
        "YE": CountryCurrency(code: "YER", symbol: "﷼"),
        "YT": CountryCurrency(code: "EUR", symbol: "€"),
        "ZA": CountryCurrency(code: "ZAR", symbol: "R"),
        "ZM": CountryCurrency(code: "ZMW", symbol: "ZK"),
        "ZW": CountryCurrency(code: "ZWL", symbol: "Z$"),
    ]
    
    static let continents: [String: CountryContinent] = [
        
        "BD": CountryContinent(code: "AS", name: "Asia"),
        "BE": CountryContinent(code: "EU", name: "Europe"),
        "BF": CountryContinent(code: "AF", name: "Africa"),
        "BG": CountryContinent(code: "EU", name: "Europe"),
        "BA": CountryContinent(code: "EU", name: "Europe"),
        "BB": CountryContinent(code: "NA", name: "North America"),
        "WF": CountryContinent(code: "OC", name: "Oceania"),
        "BL": CountryContinent(code: "NA", name: "North America"),
        "BM": CountryContinent(code: "NA", name: "North America"),
        "BN": CountryContinent(code: "AS", name: "Asia"),
        "BO": CountryContinent(code: "SA", name: "South America"),
        "BH": CountryContinent(code: "AS", name: "Asia"),
        "BI": CountryContinent(code: "AF", name: "Africa"),
        "BJ": CountryContinent(code: "AF", name: "Africa"),
        "BT": CountryContinent(code: "AS", name: "Asia"),
        "JM": CountryContinent(code: "NA", name: "North America"),
        "BV": CountryContinent(code: "AN", name: "Antarctica"),
        "BW": CountryContinent(code: "AF", name: "Africa"),
        "WS": CountryContinent(code: "OC", name: "Oceania"),
        "BQ": CountryContinent(code: "NA", name: "North America"),
        "BR": CountryContinent(code: "SA", name: "South America"),
        "BS": CountryContinent(code: "NA", name: "North America"),
        "JE": CountryContinent(code: "EU", name: "Europe"),
        "BY": CountryContinent(code: "EU", name: "Europe"),
        "BZ": CountryContinent(code: "NA", name: "North America"),
        "RU": CountryContinent(code: "EU", name: "Europe"),
        "RW": CountryContinent(code: "AF", name: "Africa"),
        "RS": CountryContinent(code: "EU", name: "Europe"),
        "TL": CountryContinent(code: "OC", name: "Oceania"),
        "RE": CountryContinent(code: "AF", name: "Africa"),
        "TM": CountryContinent(code: "AS", name: "Asia"),
        "TJ": CountryContinent(code: "AS", name: "Asia"),
        "RO": CountryContinent(code: "EU", name: "Europe"),
        "TK": CountryContinent(code: "OC", name: "Oceania"),
        "GW": CountryContinent(code: "AF", name: "Africa"),
        "GU": CountryContinent(code: "OC", name: "Oceania"),
        "GT": CountryContinent(code: "NA", name: "North America"),
        "GS": CountryContinent(code: "AN", name: "Antarctica"),
        "GR": CountryContinent(code: "EU", name: "Europe"),
        "GQ": CountryContinent(code: "AF", name: "Africa"),
        "GP": CountryContinent(code: "NA", name: "North America"),
        "JP": CountryContinent(code: "AS", name: "Asia"),
        "GY": CountryContinent(code: "SA", name: "South America"),
        "GG": CountryContinent(code: "EU", name: "Europe"),
        "GF": CountryContinent(code: "SA", name: "South America"),
        "GE": CountryContinent(code: "AS", name: "Asia"),
        "GD": CountryContinent(code: "NA", name: "North America"),
        "GB": CountryContinent(code: "EU", name: "Europe"),
        "GA": CountryContinent(code: "AF", name: "Africa"),
        "SV": CountryContinent(code: "NA", name: "North America"),
        "GN": CountryContinent(code: "AF", name: "Africa"),
        "GM": CountryContinent(code: "AF", name: "Africa"),
        "GL": CountryContinent(code: "NA", name: "North America"),
        "GI": CountryContinent(code: "EU", name: "Europe"),
        "GH": CountryContinent(code: "AF", name: "Africa"),
        "OM": CountryContinent(code: "AS", name: "Asia"),
        "TN": CountryContinent(code: "AF", name: "Africa"),
        "JO": CountryContinent(code: "AS", name: "Asia"),
        "HR": CountryContinent(code: "EU", name: "Europe"),
        "HT": CountryContinent(code: "NA", name: "North America"),
        "HU": CountryContinent(code: "EU", name: "Europe"),
        "HK": CountryContinent(code: "AS", name: "Asia"),
        "HN": CountryContinent(code: "NA", name: "North America"),
        "HM": CountryContinent(code: "AN", name: "Antarctica"),
        "VE": CountryContinent(code: "SA", name: "South America"),
        "PR": CountryContinent(code: "NA", name: "North America"),
        "PS": CountryContinent(code: "AS", name: "Asia"),
        "PW": CountryContinent(code: "OC", name: "Oceania"),
        "PT": CountryContinent(code: "EU", name: "Europe"),
        "SJ": CountryContinent(code: "EU", name: "Europe"),
        "PY": CountryContinent(code: "SA", name: "South America"),
        "IQ": CountryContinent(code: "AS", name: "Asia"),
        "PA": CountryContinent(code: "NA", name: "North America"),
        "PF": CountryContinent(code: "OC", name: "Oceania"),
        "PG": CountryContinent(code: "OC", name: "Oceania"),
        "PE": CountryContinent(code: "SA", name: "South America"),
        "PK": CountryContinent(code: "AS", name: "Asia"),
        "PH": CountryContinent(code: "AS", name: "Asia"),
        "PN": CountryContinent(code: "OC", name: "Oceania"),
        "PL": CountryContinent(code: "EU", name: "Europe"),
        "PM": CountryContinent(code: "NA", name: "North America"),
        "ZM": CountryContinent(code: "AF", name: "Africa"),
        "EH": CountryContinent(code: "AF", name: "Africa"),
        "EE": CountryContinent(code: "EU", name: "Europe"),
        "EG": CountryContinent(code: "AF", name: "Africa"),
        "ZA": CountryContinent(code: "AF", name: "Africa"),
        "EC": CountryContinent(code: "SA", name: "South America"),
        "IT": CountryContinent(code: "EU", name: "Europe"),
        "VN": CountryContinent(code: "AS", name: "Asia"),
        "SB": CountryContinent(code: "OC", name: "Oceania"),
        "ET": CountryContinent(code: "AF", name: "Africa"),
        "SO": CountryContinent(code: "AF", name: "Africa"),
        "ZW": CountryContinent(code: "AF", name: "Africa"),
        "SA": CountryContinent(code: "AS", name: "Asia"),
        "ES": CountryContinent(code: "EU", name: "Europe"),
        "ER": CountryContinent(code: "AF", name: "Africa"),
        "ME": CountryContinent(code: "EU", name: "Europe"),
        "MD": CountryContinent(code: "EU", name: "Europe"),
        "MG": CountryContinent(code: "AF", name: "Africa"),
        "MF": CountryContinent(code: "NA", name: "North America"),
        "MA": CountryContinent(code: "AF", name: "Africa"),
        "MC": CountryContinent(code: "EU", name: "Europe"),
        "UZ": CountryContinent(code: "AS", name: "Asia"),
        "MM": CountryContinent(code: "AS", name: "Asia"),
        "ML": CountryContinent(code: "AF", name: "Africa"),
        "MO": CountryContinent(code: "AS", name: "Asia"),
        "MN": CountryContinent(code: "AS", name: "Asia"),
        "MH": CountryContinent(code: "OC", name: "Oceania"),
        "MK": CountryContinent(code: "EU", name: "Europe"),
        "MU": CountryContinent(code: "AF", name: "Africa"),
        "MT": CountryContinent(code: "EU", name: "Europe"),
        "MW": CountryContinent(code: "AF", name: "Africa"),
        "MV": CountryContinent(code: "AS", name: "Asia"),
        "MQ": CountryContinent(code: "NA", name: "North America"),
        "MP": CountryContinent(code: "OC", name: "Oceania"),
        "MS": CountryContinent(code: "NA", name: "North America"),
        "MR": CountryContinent(code: "AF", name: "Africa"),
        "IM": CountryContinent(code: "EU", name: "Europe"),
        "UG": CountryContinent(code: "AF", name: "Africa"),
        "TZ": CountryContinent(code: "AF", name: "Africa"),
        "MY": CountryContinent(code: "AS", name: "Asia"),
        "MX": CountryContinent(code: "NA", name: "North America"),
        "IL": CountryContinent(code: "AS", name: "Asia"),
        "FR": CountryContinent(code: "EU", name: "Europe"),
        "IO": CountryContinent(code: "AS", name: "Asia"),
        "SH": CountryContinent(code: "AF", name: "Africa"),
        "FI": CountryContinent(code: "EU", name: "Europe"),
        "FJ": CountryContinent(code: "OC", name: "Oceania"),
        "FK": CountryContinent(code: "SA", name: "South America"),
        "FM": CountryContinent(code: "OC", name: "Oceania"),
        "FO": CountryContinent(code: "EU", name: "Europe"),
        "NI": CountryContinent(code: "NA", name: "North America"),
        "NL": CountryContinent(code: "EU", name: "Europe"),
        "NO": CountryContinent(code: "EU", name: "Europe"),
        "NA": CountryContinent(code: "AF", name: "Africa"),
        "VU": CountryContinent(code: "OC", name: "Oceania"),
        "NC": CountryContinent(code: "OC", name: "Oceania"),
        "NE": CountryContinent(code: "AF", name: "Africa"),
        "NF": CountryContinent(code: "OC", name: "Oceania"),
        "NG": CountryContinent(code: "AF", name: "Africa"),
        "NZ": CountryContinent(code: "OC", name: "Oceania"),
        "NP": CountryContinent(code: "AS", name: "Asia"),
        "NR": CountryContinent(code: "OC", name: "Oceania"),
        "NU": CountryContinent(code: "OC", name: "Oceania"),
        "CK": CountryContinent(code: "OC", name: "Oceania"),
        "XK": CountryContinent(code: "EU", name: "Europe"),
        "CI": CountryContinent(code: "AF", name: "Africa"),
        "CH": CountryContinent(code: "EU", name: "Europe"),
        "CO": CountryContinent(code: "SA", name: "South America"),
        "CN": CountryContinent(code: "AS", name: "Asia"),
        "CM": CountryContinent(code: "AF", name: "Africa"),
        "CL": CountryContinent(code: "SA", name: "South America"),
        "CC": CountryContinent(code: "AS", name: "Asia"),
        "CA": CountryContinent(code: "NA", name: "North America"),
        "CG": CountryContinent(code: "AF", name: "Africa"),
        "CF": CountryContinent(code: "AF", name: "Africa"),
        "CD": CountryContinent(code: "AF", name: "Africa"),
        "CZ": CountryContinent(code: "EU", name: "Europe"),
        "CY": CountryContinent(code: "EU", name: "Europe"),
        "CX": CountryContinent(code: "AS", name: "Asia"),
        "CR": CountryContinent(code: "NA", name: "North America"),
        "CW": CountryContinent(code: "NA", name: "North America"),
        "CV": CountryContinent(code: "AF", name: "Africa"),
        "CU": CountryContinent(code: "NA", name: "North America"),
        "SZ": CountryContinent(code: "AF", name: "Africa"),
        "SY": CountryContinent(code: "AS", name: "Asia"),
        "SX": CountryContinent(code: "NA", name: "North America"),
        "KG": CountryContinent(code: "AS", name: "Asia"),
        "KE": CountryContinent(code: "AF", name: "Africa"),
        "SS": CountryContinent(code: "AF", name: "Africa"),
        "SR": CountryContinent(code: "SA", name: "South America"),
        "KI": CountryContinent(code: "OC", name: "Oceania"),
        "KH": CountryContinent(code: "AS", name: "Asia"),
        "KN": CountryContinent(code: "NA", name: "North America"),
        "KM": CountryContinent(code: "AF", name: "Africa"),
        "ST": CountryContinent(code: "AF", name: "Africa"),
        "SK": CountryContinent(code: "EU", name: "Europe"),
        "KR": CountryContinent(code: "AS", name: "Asia"),
        "SI": CountryContinent(code: "EU", name: "Europe"),
        "KP": CountryContinent(code: "AS", name: "Asia"),
        "KW": CountryContinent(code: "AS", name: "Asia"),
        "SN": CountryContinent(code: "AF", name: "Africa"),
        "SM": CountryContinent(code: "EU", name: "Europe"),
        "SL": CountryContinent(code: "AF", name: "Africa"),
        "SC": CountryContinent(code: "AF", name: "Africa"),
        "KZ": CountryContinent(code: "AS", name: "Asia"),
        "KY": CountryContinent(code: "NA", name: "North America"),
        "SG": CountryContinent(code: "AS", name: "Asia"),
        "SE": CountryContinent(code: "EU", name: "Europe"),
        "SD": CountryContinent(code: "AF", name: "Africa"),
        "DO": CountryContinent(code: "NA", name: "North America"),
        "DM": CountryContinent(code: "NA", name: "North America"),
        "DJ": CountryContinent(code: "AF", name: "Africa"),
        "DK": CountryContinent(code: "EU", name: "Europe"),
        "VG": CountryContinent(code: "NA", name: "North America"),
        "DE": CountryContinent(code: "EU", name: "Europe"),
        "YE": CountryContinent(code: "AS", name: "Asia"),
        "DZ": CountryContinent(code: "AF", name: "Africa"),
        "US": CountryContinent(code: "NA", name: "North America"),
        "UY": CountryContinent(code: "SA", name: "South America"),
        "YT": CountryContinent(code: "AF", name: "Africa"),
        "UM": CountryContinent(code: "OC", name: "Oceania"),
        "LB": CountryContinent(code: "AS", name: "Asia"),
        "LC": CountryContinent(code: "NA", name: "North America"),
        "LA": CountryContinent(code: "AS", name: "Asia"),
        "TV": CountryContinent(code: "OC", name: "Oceania"),
        "TW": CountryContinent(code: "AS", name: "Asia"),
        "TT": CountryContinent(code: "NA", name: "North America"),
        "TR": CountryContinent(code: "AS", name: "Asia"),
        "LK": CountryContinent(code: "AS", name: "Asia"),
        "LI": CountryContinent(code: "EU", name: "Europe"),
        "LV": CountryContinent(code: "EU", name: "Europe"),
        "TO": CountryContinent(code: "OC", name: "Oceania"),
        "LT": CountryContinent(code: "EU", name: "Europe"),
        "LU": CountryContinent(code: "EU", name: "Europe"),
        "LR": CountryContinent(code: "AF", name: "Africa"),
        "LS": CountryContinent(code: "AF", name: "Africa"),
        "TH": CountryContinent(code: "AS", name: "Asia"),
        "TF": CountryContinent(code: "AN", name: "Antarctica"),
        "TG": CountryContinent(code: "AF", name: "Africa"),
        "TD": CountryContinent(code: "AF", name: "Africa"),
        "TC": CountryContinent(code: "NA", name: "North America"),
        "LY": CountryContinent(code: "AF", name: "Africa"),
        "VA": CountryContinent(code: "EU", name: "Europe"),
        "VC": CountryContinent(code: "NA", name: "North America"),
        "AE": CountryContinent(code: "AS", name: "Asia"),
        "AD": CountryContinent(code: "EU", name: "Europe"),
        "AG": CountryContinent(code: "NA", name: "North America"),
        "AF": CountryContinent(code: "AS", name: "Asia"),
        "AI": CountryContinent(code: "NA", name: "North America"),
        "VI": CountryContinent(code: "NA", name: "North America"),
        "IS": CountryContinent(code: "EU", name: "Europe"),
        "IR": CountryContinent(code: "AS", name: "Asia"),
        "AM": CountryContinent(code: "AS", name: "Asia"),
        "AL": CountryContinent(code: "EU", name: "Europe"),
        "AO": CountryContinent(code: "AF", name: "Africa"),
        "AQ": CountryContinent(code: "AN", name: "Antarctica"),
        "AS": CountryContinent(code: "OC", name: "Oceania"),
        "AR": CountryContinent(code: "SA", name: "South America"),
        "AU": CountryContinent(code: "OC", name: "Oceania"),
        "AT": CountryContinent(code: "EU", name: "Europe"),
        "AW": CountryContinent(code: "NA", name: "North America"),
        "IN": CountryContinent(code: "AS", name: "Asia"),
        "AX": CountryContinent(code: "EU", name: "Europe"),
        "AZ": CountryContinent(code: "AS", name: "Asia"),
        "IE": CountryContinent(code: "EU", name: "Europe"),
        "ID": CountryContinent(code: "AS", name: "Asia"),
        "UA": CountryContinent(code: "EU", name: "Europe"),
        "QA": CountryContinent(code: "AS", name: "Asia"),
        "MZ": CountryContinent(code: "AF", name: "Africa"),
    ]
    
    final var countryFlagURL = "https://cdn.ipinfo.io/static/images/countries-flags/"
}
